<div class="builder formbuilder-box">
    {// 额外功能代码top }
    <?php if(isset($extra_html['top'])): ?>
        {$extra_html['top']}
    <?php endif; ?>

    <notempty name="tab_nav">
        <div class="builder-tabs builder-tabs-link">
            <ul class="nav nav-tabs">
                <volist name="tab_nav.tab_list" id="tab">
                    <li class="<php>if($tab_nav['current_tab'] == $key) echo 'active';</php>"><a href="{$tab.href}">{$tab.title}</a></li>
                </volist>
            </ul>
        </div>
        <div class="form-group"></div>
    </notempty>

    {// 数据列表 }
    <div class="builder-container">
        <div class="row">
            <div class="col-xs-12">
                <form action="{$post_url}" method="post" class="form-horizontal form form-builder">
                    <div class="form-type-list">
                        <volist name="form_items" id="form" key="k">
                            <switch name="form.type">
                                <include file='[builderpath]/widget/hidden.html' type='' />
                                {// 不可修改文本 }
                                <include file='[builderpath]/widget/static.html' type='' />
                                {// 数字 }
                                <include file='[builderpath]/widget/num.html' type='' />
                                {// UID }
                                <include file='[builderpath]/widget/uid.html' type='' />
                                {// UIDS }
                                <include file='[builderpath]/widget/uids.html' type='' />
                                {// 价格 }
                                <include file='[builderpath]/widget/price.html' type='' />
                                {// 字符串 }
                                <include file='[builderpath]/widget/text.html' type='' />
                                {// 文本 }
                                <include file='[builderpath]/widget/textarea.html' type='' />
                                {// 数组 }
                                <include file='[builderpath]/widget/array.html' type='' />
                                {// 密码 }
                                <include file='[builderpath]/widget/password.html' type='' />
                                {// 开关 }
                                <include file='[builderpath]/widget/toggle.html' type='' />
                                {// 单选按钮 }
                                <include file='[builderpath]/widget/radio.html' type='' />
                                {// 复选框 }
                                <include file='[builderpath]/widget/checkbox.html' type='' />
                                {// 下拉框 }
                                <include file='[builderpath]/widget/select.html' type='' />
                                {// 下拉框(多选) }
                                <include file='[builderpath]/widget/selects.html' type='' />
                                {// 图标 }
                                <include file='[builderpath]/widget/icon.html' type='' />
                                {// 日期 }
                                <include file='[builderpath]/widget/date.html' type='' />
                                {// 时间 }
                                <include file='[builderpath]/widget/datetime.html' type='' />
                                {// 时刻 }
                                <include file='[builderpath]/widget/clock.html' type='' />
                                {// 时间区间 }
                                <include file='[builderpath]/widget/dateranger.html' type='' />
                                {// 图片 }
                                <include file='[builderpath]/widget/picture.html' type='' />
                                {// 图片temp }
                                <include file='[builderpath]/widget/picture_temp.html' type='' />
                                {// 图片(多图) }
                                <include file='[builderpath]/widget/pictures.html' type='' />
                                {// 图片(多图)temp }
                                <include file='[builderpath]/widget/pictures_temp.html' type='' />
                                {// 文件 }
                                <include file='[builderpath]/widget/file.html' type='' />
                                {// 多文件 }
                                <include file='[builderpath]/widget/files.html' type='' />
                                {// 媒体 }
                                <include file='[builderpath]/widget/media.html' type='' />
                                {// 多媒体 }
                                <include file='[builderpath]/widget/medias.html' type='' />
                                {// 编辑器 summernote }
                                <include file='[builderpath]/widget/summernote.html' type='' />
                                {// 编辑器 kindeditor }
                                <include file='[builderpath]/widget/kindeditor.html' type='' />
                                {// 编辑器 markdown }
                                <include file='[builderpath]/widget/editormd.html' type='' />
                                {// 百度地图 }
                                <include file='[builderpath]/widget/bdmap.html' type='' />
                                {// 谷歌地图 }
                                <include file='[builderpath]/widget/gmap.html' type='' />
                                {// Mapbox }
                                <include file='[builderpath]/widget/mapbox.html' type='' />
                                {// 三级联动 }
                                <include file='[builderpath]/widget/linkage.html' type='' />
                                {// 标签 }
                                <include file='[builderpath]/widget/tags.html' type='' />
                                {// 表格 }
                                <include file='[builderpath]/widget/table.html' type='' />
                                {// 拖动排序 }
                                <include file='[builderpath]/widget/board.html' type='' />
                                <case value="group">
                                    <div class="form-group"></div>
                                    <div class="builder-tabs builder-tabs-tab form-group">
                                        <?php $group_k = 0; ?>
                                        <ul class="nav nav-tabs">
                                            <volist name="form.options" id="li" key="group_k">
                                                <li data-tab="tab{$group_k}" <eq name="group_k" value="1">class="active"</eq>><a href="#tab{$group_k}" data-toggle="tab">{$li.title}</a></li>
                                            </volist>
                                        </ul>
                                    </div>
                                    <div class="builder-container">
                                        <div class="tab-content">
                                            <volist name="form.options" id="tab" key="group_k">
                                                <div id="tab{$group_k}" class='tab-pane <eq name="group_k" value="1">active</eq> tab{$group_k}'>
                                                    <div class="group">
                                                        <volist name="tab.options" id="tab_form" key="tab_k">
                                                            <switch name="tab_form.type">
                                                                <include file='[builderpath]/widget/hidden.html' type='tab_' />
                                                                {// 不可修改文本 }
                                                                <include file='[builderpath]/widget/static.html' type='tab_' />
                                                                {// 数字 }
                                                                <include file='[builderpath]/widget/num.html' type='tab_' />
                                                                {// UID }
                                                                <include file='[builderpath]/widget/uid.html' type='tab_' />
                                                                {// UIDS }
                                                                <include file='[builderpath]/widget/uids.html' type='tab_' />
                                                                {// 价格 }
                                                                <include file='[builderpath]/widget/price.html' type='tab_' />
                                                                {// 字符串 }
                                                                <include file='[builderpath]/widget/text.html' type='tab_' />
                                                                {// 文本 }
                                                                <include file='[builderpath]/widget/textarea.html' type='tab_' />
                                                                {// 数组 }
                                                                <include file='[builderpath]/widget/array.html' type='tab_' />
                                                                {// 密码 }
                                                                <include file='[builderpath]/widget/password.html' type='tab_' />
                                                                {// 开关 }
                                                                <include file='[builderpath]/widget/toggle.html' type='tab_' />
                                                                {// 单选按钮 }
                                                                <include file='[builderpath]/widget/radio.html' type='tab_' />
                                                                {// 复选框 }
                                                                <include file='[builderpath]/widget/checkbox.html' type='tab_' />
                                                                {// 下拉框 }
                                                                <include file='[builderpath]/widget/select.html' type='tab_' />
                                                                {// 下拉框(多选) }
                                                                <include file='[builderpath]/widget/selects.html' type='tab_' />
                                                                {// 图标 }
                                                                <include file='[builderpath]/widget/icon.html' type='tab_' />
                                                                {// 日期 }
                                                                <include file='[builderpath]/widget/date.html' type='tab_' />
                                                                {// 时间 }
                                                                <include file='[builderpath]/widget/datetime.html' type='tab_' />
                                                                {// 时刻 }
                                                                <include file='[builderpath]/widget/clock.html' type='tab_' />
                                                                {// 时间区间 }
                                                                <include file='[builderpath]/widget/dateranger.html' type='tab_' />
                                                                {// 图片 }
                                                                <include file='[builderpath]/widget/picture.html' type='tab_' />
                                                                {// 图片temp }
                                                                <include file='[builderpath]/widget/picture_temp.html' type='' />
                                                                {// 图片(多图) }
                                                                <include file='[builderpath]/widget/pictures.html' type='tab_' />
                                                                {// 图片(多图)temp }
                                                                <include file='[builderpath]/widget/pictures_temp.html' type='' />
                                                                {// 文件 }
                                                                <include file='[builderpath]/widget/file.html' type='tab_' />
                                                                {// 多文件 }
                                                                <include file='[builderpath]/widget/files.html' type='tab_' />
                                                                {// 媒体 }
                                                                <include file='[builderpath]/widget/media.html' type='tab_' />
                                                                {// 多媒体 }
                                                                <include file='[builderpath]/widget/medias.html' type='tab_' />
                                                                {// 编辑器 summernote }
                                                                <include file='[builderpath]/widget/summernote.html' type='tab_' />
                                                                {// 编辑器 kindeditor }
                                                                <include file='[builderpath]/widget/kindeditor.html' type='tab_' />
                                                                {// 编辑器 markdown }
                                                                <include file='[builderpath]/widget/editormd.html' type='tab_' />
                                                                {// 百度地图 }
                                                                <include file='[builderpath]/widget/bdmap.html' type='tab_' />
                                                                {// 谷歌地图 }
                                                                <include file='[builderpath]/widget/gmap.html' type='tab_' />
                                                                {// Mapbox }
                                                                <include file='[builderpath]/widget/mapbox.html' type='tab_' />
                                                                {// 三级联动 }
                                                                <include file='[builderpath]/widget/linkage.html' type='tab_' />
                                                                {// 标签 }
                                                                <include file='[builderpath]/widget/tags.html' type='tab_' />
                                                                {// 表格 }
                                                                <include file='[builderpath]/widget/table.html' type='tab_' />
                                                                {// 拖动排序 }
                                                                <include file='[builderpath]/widget/board.html' type='tab_' />
                                                                // 扩展类型
                                                                <default />
                                                                {:hook('FormBuilderExtend', array('form' => $tab_form, 'type' => tab_))}
                                                            </switch>
                                                        </volist>
                                                    </div>
                                                </div>
                                            </volist>
                                        </div>
                                    </div>
                                    <div class="form-group"><hr></div>
                                </case>

                                // 扩展类型
                                <default />
                                {:hook('FormBuilderExtend', array('form' => $form))}
                            </switch>
                        </volist>
                        <empty name="form_items">
                            <div class="builder-data-empty text-center">
                                <div class="empty-info">
                                    <i class="fa fa-database"></i> 暂时没有数据<br>
                                    <span class="small">本系统由 <a href="{:C('WEBSITE_DOMAIN')}" class="text-muted" target="_blank">{:C('PRODUCT_TITLE')}</a> v{:C('CURRENT_VERSION')} 强力驱动</span>
                                </div>
                            </div>
                        </empty>
                        <div class="form-group"></div>
                        <div class="form-group bottom_button_list">
                            <a class="btn btn-primary submit <?php if($ajax_submit) echo 'ajax-post';?>" type="submit" target-form="form-builder"><?php if ($submit_title) {echo $submit_title;} else {echo '确定';} ?></a>
                            <!--底部按钮-->
                            <volist name="bottom_button_list" id="vo">
                                <a <?php if($vo['href']) echo 'href="'.$vo['href'].'"'; ?> <?php if($vo['href']) echo 'url="'.$vo['href'].'"'; ?>  class="{$vo.class} <?php if($ajax_submit && $vo['type'] == 'submit') echo 'ajax-post';?> m-r-xs" type="{$vo.type}" target-form="form-builder">{$vo.title}</a>
                            </volist>
                            <?php if($hide_bottom_cancel === false): ?>
                                <a class="btn btn-danger return" onclick="javascript:history.back(-1);return false;">取消</a>
                            <?php endif; ?>
                            <script type="text/javascript">
                                $('a[type="submit"]').click(function(){
                                    if (!$(this).hasClass('ajax-post')) {
                                        $("form.form-builder").submit();
                                    }
                                });
                            </script>
                        </div>
                    </div>
                </form>
            </div>
        </div>
    </div>

    {// 额外功能代码bottom }
    <?php if(isset($extra_html['bottom'])): ?>
        {$extra_html['bottom']}
    <?php endif; ?>
</div>
